import request from "@/utils/request.js";
import Cache from "@/utils/cache.js"
const url = '/salesman'

/**
 * 业务员小程序 上传资讯
  POST /blog_salesman/uploadBlog
  接口ID：113941886
  接口地址：https://app.apifox.com/link/project/1304221/apis/api-113941886
 */
// 上传资讯
export function uploadBlog(data) {
  return request.post(url + `/blog_salesman/uploadBlog`, data);
}
// 业务员小程序 编辑资讯
export function editBlog(data) {
  return request.post(url + `/blog_salesman/editBlog`, data);
}
/**
 * 业务员小程序 资讯详情
  DELETE /blog_salesman/getBlogInfo/{videoInfoId}
  接口ID：114085637
  接口地址：https://app.apifox.com/link/project/1304221/apis/api-114085637
 */
export function getBlogInfo(videoInfoId) {
  return request.get(url + `/blog_salesman/getBlogInfo/${videoInfoId}`);
}

// 获取咨询列表
export function getBlogList(data) {
  return request.post(url + `/blog_salesman/pageBlog`, data);
}

// 删除咨询列表
export function delBlog(videoInfoId) {
  return request.delete(url + `/blog_salesman/delBlog/${videoInfoId}`);
}

// 获取视频列表
export function getPageVideo(data) {
  return request.post(url + `/video_info_salesman/pageVideo`, data);
}
// 获取业务员个人信息带上归属地
export function infoWithHomePlace() {
  return request.get(url + `/salesman/infoWithHomePlace
`);
}


// 上传视频
export function uploadVideo(data) {
  return request.post(url + `/video_info_salesman/uploadVideo`, data);
}

// 上传视频
export function salesmanVideo(data) {
  return request.post(url + `/video_info_salesman/pageVideo`, data);
}

export function getSalesmanByCustomerIdNoToken(customerId) {
  return request.get(url + `/open/getSalesmanByCustomerIdNoToken/${customerId}`);
}


